#include <stdio.h>

char *my_strcpy(char *dest, const char *src)
{
    char *m = dest;
    while((*dest = *src) != '\0')
    {
        dest++;
        src++;
    }
    return m;
}

int main(int argc, char const *argv[])
{
    char buffer[10];
    char *p = "abcd";
    char *cp = p;

    my_strcpy(buffer,cp);
    printf("%s\n",buffer);

    return 0;
}
